import { defineStore } from 'pinia'
import { ref } from 'vue'

export const uerStore = defineStore(
  'Big-user',
  () => {
    const token = ref('')
    const count = ref(0)
    const userinfo = ref({
      name: '',
      age: 0
    })
    /** 新增 */
    const addCountHandle = () => {
      count.value++
    }
    return {
      token,
      count,
      addCountHandle,
      userinfo
    }
  },
  {
    persist: true
  }
)
